package cn.tfyhyc.springcloud.controller;

import cn.tfyhyc.springcloud.entity.Order;
import cn.tfyhyc.springcloud.service.OrderService;
import cn.tfyhyc.springcloud.vo.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 头发又黑又长
 * @Date 2022/10/30 9:18
 * @email zwb15083976291@163.com
 */
@RestController
public class OrderController {

    @Resource
    private OrderService orderService;


    @GetMapping("/order/create")
    public CommonResult createOrder(Order order) {
        orderService.create(order);
        return new CommonResult(200, "创建订单成功");
    }


}
